/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.googlecode.jsimplemarket.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.Index;

/**
 *
 * @author Alexandru.Codescu
 */
@MappedSuperclass
public class AbstractIstoric extends AbstractEntitate implements
        IIstoric {

    private Date dataInceput;
    private Date dataSfarsit;

    @Temporal(value = TemporalType.TIMESTAMP)
    @Index(name = "IDX_DATA_INCEPUT")
    @Column(name = "DATA_INCEPUT")
    @Override
    public Date getDataInceput() {
        return dataInceput;
    }

    @Override
    public void setDataInceput(Date dataInceput) {
        this.dataInceput = dataInceput;
    }

    @Temporal(value = TemporalType.TIMESTAMP)
    @Column(name = "DATA_SFARSIT")
    @Index(name = "IDX_DATA_SFARSIT")
    @Override
    public Date getDataSfarsit() {
        return dataSfarsit;
    }

    @Override
    public void setDataSfarsit(Date dataSfarsit) {
        this.dataSfarsit = dataSfarsit;
    }
}
